<?php
namespace Content\Model;
use Think\Model\RelationModel;
class ArticleModel extends RelationModel {
	protected $_link = array(
        'Count'=>array(
        	'mapping_type'    =>self::HAS_ONE,
            'class_name'    =>'article_count',
            'foreign_key'=>'articleid',
            'mapping_name' =>'count',
         ),
        'Detail'=>array(
          	'mapping_type'    =>self::HAS_ONE,
            'class_name'    =>'article_detail',
            'foreign_key'=>'articleid',
            'mapping_name' =>'detail',
        ),
        'Type'=>array(
                'mapping_type'    =>self::BELONGS_TO,
                'class_name'    =>'type',
                'foreign_key'=>'typeid',
                'mapping_name' =>'type',
        ),
        /*'Url'=>array(
                'mapping_type'    =>self::BELONGS_TO,
                'class_name'    =>'url',
                'foreign_key'=>'urlid',
                'mapping_name' =>'url',
        ),*/
    );
}
?>